<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>礼盒详情</title>

<link href="__PUBLIC__/plugins/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link href="__PUBLIC__/plugins/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
<link href="__PUBLIC__/themes/global/global.css" rel="stylesheet">
<link href="__PUBLIC__/themes/wechat/openbox/style.css" rel="stylesheet">
<script src="__PUBLIC__/plugins/jquery/2.1.3/jquery.min.js"></script>
<script src="__PUBLIC__/plugins/bootstrap/3.3.5/js/bootstrap.min.js"></script> 
<script src="__PUBLIC__/plugins/jquerymobile/jquery.mobile.custom.min.js"></script>
<script src="__PUBLIC__/js/global.js"></script>
<script src="__PUBLIC__/js/wechat/cmcc_openbox/box_detail.js"></script>
<script>

$(function(){
  Box_Detail.init(<?php echo json_encode( $config ) ?>);
});
</script>
</head>
<body>
<div class="body">
  <?php if ( $data['award_name'] == '未中奖' ) : ?>
  <div style="text-align:center; padding-top:120px;">
    <p><i class="fa fa-frown-o" style="font-size:200px;"></i></p>
    
    <p>抱歉，礼盒中没有礼品</p>
  </div>
  <div class="button-info">
    <a href="<?php echo $take_box_url ?>"><img src="__PUBLIC__/themes/wechat/openbox/images/btn_again2.png"></a>
  </div>
  <?php else : ?>
  <h3 class="text-center"><?php echo $award_rank[$data['award_rank']] ?></h3>
  <div class="adv-img" >
    <img src="<?php echo site_url( '/' . $event_data['award_adv_img'] ) ?>">
  </div>
  <div class="light">
    <img src="__PUBLIC__/themes/wechat/openbox/images/light.png">
  </div>
  <div class="detail-info" >
    <dl class="my-dl-horizontal">
      <dt>奖品：</dt>
      <dd><?php echo $data['award_name']?></dd>
      
      <dt>有效期：</dt>
      <dd><?php echo $data['valid_start_time'] .' 至 ' . $data['valid_end_time'] ?> </dd>
      
      <dt>兑换码：</dt>
      <dd><?php echo $data['award_sn']?></dd>
      
      <dt>状态：</dt>
      <dd><?php echo $award_status[$data['award_status']]?></dd>
      
      <dt>活动规则：</dt>
      <dd><a id="load_event_rule" href="#" style="color:#ffffff">马上查看 <i class="fa fa-arrow-right"></i> </a></dd>
    </dl>
  </div>
  <div class="button-info" style="margin-top:-20px;">
    <?php if ( $data['valid_type'] != 2 ) :?>
    <a id="load_auth_award_btn" href="#"><img src="__PUBLIC__/themes/wechat/openbox/images/btn_exchange.png"></a>
    <?php endif ; ?>
    <a href="<?php echo $take_box_url ?>" id="to_take_box_btn"><img src="__PUBLIC__/themes/wechat/openbox/images/btn_again2.png"></a>
    
  </div>
  <?php endif ; ?>
</div>

<div class="modal fade" id="auth_award_modal">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-body">
        <div class="box-gift">
          <img src="__PUBLIC__/themes/wechat/openbox/images/icon_prize_useless.png">
          <h4>礼品兑换</h4>
        </div>
        <form id="auth_award_form" class="form-horizontal" style="margin-bottom:30px;">
          <div class="form-group">
            <label for="inputEmail3" class="col-sm-3 control-label">兑换密码</label>
            <div class="col-sm-7">
              <input id="award_auth_pwd" type="text" class="form-control" placeholder="兑换密码">
            </div>
          </div>
          <button id="auth_award_btn" class="btn btn-danger btn-block" type="submit">确 认</button>
          <button type="button" class="btn btn-default btn-block" data-dismiss="modal">关闭</button>
        </form>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<!-- Modal -->
<div class="modal fade" id="list_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog modal-sm" role="document">
    <div class="modal-content">
      <div class="modal-body">
        <div class="modal-inner" style="display:block">
          <dl>
            <dt>活动时间</dt>
            <dd><?php echo $event_data['start_time'] .' - ' . $event_data['end_time'] ?> </dd>
          </dl>
          
          <dl>
            <dt>活动规则</dt>
            <dd><?php echo $event_data['rule'] ?> </dd>
          </dl>
          
          <dl>
            <dt>领奖说明</dt>
            <dd><?php echo $event_data['awarding_rule'] ?> </dd>
          </dl>
        </div>
        <button type="button" class="btn btn-default btn-block" data-dismiss="modal">关闭</button>
      </div>
    </div>
  </div>
</div>

</body>
</html>